package menber3;
import java.util.Random;
public class Dog {
    Random r=new Random();
    int r3= r.nextInt(3);
    private String id="202112020003";
    private String name="哈士奇";
    private String color="黑白相间";
    private String weigh="40kg";
    private String from="家里";
    private String heart;
    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getColor() {
        return color;
    }

    public String getWeigh() {
        return weigh;
    }

    public String getFrom() {
        return from;
    }

    public String getHeart() {
        return heart;
    }

    public void setHeart() {
       switch(r3)
       {
           case 0:this.heart="开心";
               break;
           case 1:this.heart="沮丧";
               break;
           case 2:this.heart="普通";
               break;
       }
    }

    public void show()
    {
        setHeart();
        System.out.println("id:"+id);
        System.out.println("名称:"+name);
        System.out.println("颜色:"+color);
        System.out.println("体重:"+weigh);
        System.out.println("生源地:"+from);
        System.out.println("心情:"+heart);
    }
}
